import './assets/css/dafeiji.css';
import {GameEngine} from "./utils/gameEngine";
import {myPlane} from "./utils/myPlane";

const oMain: HTMLDivElement = document.querySelector('.main') as HTMLDivElement;

oMain.addEventListener('click', (e: MouseEvent) => {
  //获取到鼠标点击的目标元素,把目标元素转换成HTMLElement
  const target = e.target as HTMLLIElement;
  //判断是不是li标签
  if(target.nodeName != "LI") return;
  
  console.log(target.value);
  GameEngine.init(function(){
    myPlane.init(target.value).fire();
  });
});
